<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>axidma: xaxidma_example_simple_intr.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">axidma
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxidma__example__simple__intr_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xaxidma_example_simple_intr.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file demonstrates how to use the xaxidma driver on the Xilinx AXI DMA core (AXIDMA) to transfer packets.in interrupt mode when the AXIDMA core is configured in simple mode. </p>
<p>This code assumes a loopback hardware widget is connected to the AXI DMA core for data packet loopback.</p>
<p>To see the debug print, you need a Uart16550 or uartlite in your system, and please set "-DDEBUG" in your compiler options. You need to rebuild your software executable.</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
----- ---- -------- -------------------------------------------------------
4.00a rkv  02/22/11 New example created for simple DMA, this example is for
               simple DMA,Added interrupt support for Zynq.
4.00a srt  08/04/11 Changed a typo in the RxIntrHandler, changed
               XAXIDMA_DMA_TO_DEVICE to XAXIDMA_DEVICE_TO_DMA
5.00a srt  03/06/12 Added Flushing and Invalidation of Caches to fix CRs
               648103, 648701.
               Added V7 DDR Base Address to fix CR 649405.
6.00a srt  03/27/12 Changed API calls to support MCDMA driver.
7.00a srt  06/18/12 API calls are reverted back for backward compatibility.
7.01a srt  11/02/12 Buffer sizes (Tx and Rx) are modified to meet maximum
               DDR memory limit of the h/w system built with Area mode
7.02a srt  03/01/13 Updated DDR base address for IPI designs (CR 703656).
9.1   adk  01/07/16 Updated DDR base address for Ultrascale (CR 799532) and
               removed the defines for S6/V6.
9.2   vak  15/04/16 Fixed compilation warnings in the example
9.3   ms   01/23/17 Modified xil_printf statement in main function to
                    ensure that "Successfully ran" and "Failed" strings are
                    available in all examples. This is a fix for CR-965028.
9.6   rsp  02/14/18 Support data buffers above 4GB.Use UINTPTR for typecasting
                    buffer address (CR-992638).
9.9   rsp  01/21/19 Fix use of #elif check in deriving DDR_BASE_ADDR.
9.10  rsp  09/17/19 Fix cache maintenance ops for source and dest buffer.
9.14  sk   03/08/22 Delete DDR memory limits comments as they are not
                       relevant to this driver version.
9.15  sa   08/12/22 Updated the example to use latest MIG cannoical define
                       i.e XPAR_MIG_0_C0_DDR4_MEMORY_MAP_BASEADDR.
9.16  sa   09/29/22 Fix infinite loops in the example.
</pre><hr/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxidma__example__simple__intr_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function. </p>
<p>This function is the main entry of the interrupt test. It does the following: Set up the output terminal if UART16550 is in the hardware build Initialize the DMA engine Set up Tx and Rx channels Set up the interrupt system for the Tx and Rx interrupts Submit a transfer Wait for the transfer to finish Check transfer status Disable Tx and Rx interrupts Print test status and exit</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if example finishes successfully</li>
<li>XST_FAILURE if example fails.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group___a_x_i_d_m_a.html#ga8026e76c90d891d21c9c355ff776cb77">XAxiDma_CfgInitialize()</a>, <a class="el" href="group___a_x_i_d_m_a.html#ga18dd03026dd6c0ebd13526116c09ccae">XAxiDma_HasSg</a>, <a class="el" href="group___a_x_i_d_m_a.html#ga1936b497c0fa61d326807e5ed8dd572b">XAxiDma_IntrDisable</a>, <a class="el" href="group___a_x_i_d_m_a.html#gadac28afa26e2cb55bdada1ee3c016c52">XAxiDma_IntrEnable</a>, <a class="el" href="group___a_x_i_d_m_a.html#ga8347e41a5c01bdabefce9c8484a7ced1">XAXIDMA_IRQ_ALL_MASK</a>, <a class="el" href="group___a_x_i_d_m_a.html#ga0cbcf5259635ea3c336fe5413c98f75c">XAxiDma_LookupConfig()</a>, and <a class="el" href="group___a_x_i_d_m_a.html#ga32ca6099d7926297a4c17cdb4a19511b">XAxiDma_SimpleTransfer()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
